# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: DrZaius <lou[at]fakeoutdoorsman[dot]com>
# Contributor: pumbur

pkgname=opus
pkgver=1.3.1
pkgrel=2
pkgdesc="Totally open, royalty-free, highly versatile audio codec"
arch=(x86_64)
url="https://www.opus-codec.org/"
license=(BSD)
depends=(glibc)
makedepends=(doxygen)
source=(https://archive.mozilla.org/pub/$pkgname/$pkgname-$pkgver.tar.gz)
sha256sums=('65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --disable-static --enable-custom-modes
  make
}

check() {
  cd $pkgname-$pkgver
  make check
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 COPYING
}
